package com.itheima.stock.config;

import com.itheima.stock.utils.IdWorker;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CommonConfig {
    /**
     * 参数一：机器id
     * 参数二：数据中心id
     * @return
     */
    @Bean
    public IdWorker idWorker(){
        return new IdWorker(1L,2L);
    }
}
